<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2.JQuery事件绑定</title>
</head>
<script src="js/jquery-3.5.1.js"></script>

<script>
    // JQ入口函数，相当于window.onload
    $(function () {

    });
</script>
<body>


<div id="div1">xxxx</div>
<div id="div2">xxxx</div>
<input id="btn1" type="button" value="ClickMe">

</body>

<script>
    // JS处理点击事件
    document.getElementById("btn1").onclick = function() {
       alert("js handle clicked");
    };
    // JQ处理点击事件
    $("#btn1").click(function () {
        alert("clicked");
    });
</script>
</html>